<%Const respagecode="dictionary_edit"%><% 'UTF-8%>
<%''加载通用函数和数据库连接%>
<!--#include file="../Include/Start.asp"-->
<%'检查是否登录%>
<!--#include file="../Include/checklogin.asp"-->


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 	<!--meta信息-->
	<!--#include file="../Include/meta.asp"-->
	<!--end meta-->

	<link href="../css/css-1.05.css" rel="stylesheet" type="text/css" />
	<link href="../css/console-1.03.css" rel="stylesheet" type="text/css" />
	<link href="../css/calendar.css" rel="stylesheet" type="text/css" />
	<link href="../css/console_home-1.06.css" rel="stylesheet" type="text/css" />
	
	<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="../js/jquery.extend-1.06.js"></script>
	<script type="text/javascript" src="../js/common_1.01.js"></script>
	<script type="text/javascript" src="../js/calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="../js/menu.js"></script>
	<script type="text/javascript" src="../js/TrimPathTemplate.js"></script>
	<script type="text/javascript" src="../js/console_dictionary.js"></script>
</head>

<body>
<div class="wrapper">

	<!--header页头信息-->
	<!--#include file="../Include/header.asp"-->
	<!--end header页头信息-->


	<!--navigation菜单信息-->
	<!--#include file="../Include/navigation.asp"-->
	<script type="text/javascript">
		$("#navigation").menu('point');
		/*选中该tab页 需要tab页上有ID*/
		$("#system").attr("className","on")		
	</script>
	<!--end navigation菜单信息-->

<!--begin container-->
<div class="container" id="container">
	<div class="c_left">
		<!--begin left_menu 左侧菜单信息-->
		<!--#include file="../Include/left_menu.asp"-->
		<!--end left_menu 左侧菜单信息-->	
	</div>
	<div class="c_right">
		<div class="c_r_head">
			<ul class="head_tab">
				<li><h4><a href="dictionary.asp##div_tab_list">查询记录</a></h4></li>
				<li class="on"><h4><a href="#">修改</a></h4></li>
				<li><h4><a href="dictionary.asp##div_tab_add">新增</a></h4></li>
			</ul>
		</div>	
	<%
		''定义查询字段变量
		''id, code编码, cname名称, c_key键值, c_txt显示文字, sort_num排序序号
	dim cid, code, cname, c_key, c_txt, sort_num ,pid 
	cid=ReplaceBadChar(Trim(request("id")))
	if(""=cid) then response.redirect "/dictionary.asp" ''如果id并没有传来跳转回原处
		''Dim rsObj,strSql
		set rsObj=Server.CreateObject("ADODB.Recordset")
		strSql = "Select   "
		strSql =  strSql & "  uew.id, uew.code, uew.name, uew.c_key, uew.c_txt, uew.sort_num, uew.pid  "		
		strSql =  strSql & " FROM [T_数据字典] uew   "
		strSql=strSql & "   where uew.id='"&cid&"' "
		
		''Response.Write strSql & "-----"
		rsObj.Open strSql, Conn, 1, 3
		If rsObj.BOF And rsObj.EOF Then 
			 response.redirect "/dictionary.asp" ''如果id并没有传来跳转回原处
		end if	 
		cid=Trim(rsObj("id"))
		code=rsObj("code") 
		cname=rsObj("name") 
		c_key=rsObj("c_key") 
		c_txt=rsObj("c_txt") 
		sort_num=rsObj("sort_num") 
		pid =rsObj("pid") 
		
		''Response.Write wtfl&"---wtfl--<br>" 
		''关闭链接
		''rsObj.close		

	%>	
		
		<div class="c_r_body" id="div_tab_edit" name="div_tab_edit">
			<form id="form_edit" action="dictionary_do.asp" method="post">
				<input id="cid" name="cid" type="hidden" value="<%=cid%>" />
				<div align="center" style="height:25px">
					请输入详细信息
				</div>
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
					<tr class="line">
                         <td colspan="4"><div/></td>
                    </tr>	 
					<tr>
						<td align="right">编码：</td><td>
							<input type="text" name="code" id="code" class="text" value="<%=code%>" style="width:90px" maxlength="50" />
						</td>
						<td align="right">名称：</td><td>
							<input type="text" name="cname" id="cname" class="text" value="<%=cname%>" style="width:90px" maxlength="50" />
						</td>
                    </tr>	 
					<tr>
						<td align="right">显示文本：</td><td>
							<input type="text" name="c_txt" id="c_txt" class="text" value="<%=c_txt%>" style="width:90px" maxlength="50" />
						</td>
						<td align="right">键值：</td><td>
							<input type="text" name="c_key" id="c_key" class="text" value="<%=c_key%>" style="width:90px" maxlength="50" />
						</td>
					</tr>
					<tr>
						<td align="right">排序序号:</td>
						<td><input id="sort_num" name="sort_num" value="<%=sort_num%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">父层编码:</td>
						<td><input id="p_id" name="p_id" value="<%=pid%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
		 				
					<tr>
						<td align="right"> </td>
						<td><input name="" type="submit" value="修改保存" />&nbsp;<label id="result"></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>

	<script type="text/javascript">
		//加载页面js
		$(document).ready(function(){
		 
				initPage_edit();
		});		 
		 
 
	</script>
	
 
 
</div>



	
	
</div>
<!--footer页脚信息-->
<!--#include file="../Include/footer.asp"-->
<!--end footer页脚信息-->
</div>
</body>
</html>

<%
		''	Set rsObj = Nothing 

 '释放数据库链接
	''call CloseConn	
	%>	
